<%--
  Created by IntelliJ IDEA.
  User: 骆鹏
  Date: 2017/7/27
  Time: 11:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <title>指挥中心</title>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
    <meta http-equiv="Expires" content="0" />
    <%--<meta http-equiv="X-UA-Compatible" content="IE=8,chrome=1">--%>
    <meta name="viewport" content="width=device-width, initial-scale=0.3, user-scalable=0, minimum-scale=0, maximum-scale=5.0,user-scalable=yes">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <link rel="stylesheet" href="/css/main/fullscreen.css">
    <script src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js"></script>
    <script src="/lib/Highcharts-5.0.14/code/highcharts.js"></script>
    <script src="/lib/Highcharts-5.0.14/code/modules/data.js"></script>
    <script src="/lib/Highcharts-5.0.14/code/modules/drilldown.js"></script>
    <script type="text/javascript" src="/lib/layer/layer.js?20201106"></script>
    <script type="text/javascript" src="/js/echarts.min.js"></script>
    <script src="/lib/Highcharts-6.0.4/code/highcharts.js"></script>
    <script src="/lib/Highcharts-6.0.4/code/modules/oldie.js"></script>
    <script src="/lib/Highcharts-6.0.4/code/modules/exporting.js"></script>
<script type="text/javascript" src="/lib/jQuery-bzt/js/corechart.js"></script>
    <script type="text/javascript" src="/lib/jQuery-bzt/js/jquery.gvChart-1.0.1.min.js"></script>
    <script type="text/javascript" src="/lib/jQuery-bzt/js/jquery.ba-resize.min.js"></script>
    <script src="/lib/echarts/echarts.min.js"></script>

    <script>
        document.write("<link type='text/css' href='/css/vide/video.css?version=" + new Date().getTime() + "' rel='stylesheet' />");
    </script>

    <style>
        .hide{display:none;}
        .highcharts-color-0 text{
            fill: #fff!important;
        }
        .highcharts-color-1 text{
            fill: #fff!important;
        }
        .bgboxs{
            width: 44%;
            height: 100%;
            float: left;
            margin-top: 20px;
        }
        .bgtitle{
            position: relative;
        }
        .bgtitle label{
            position: absolute;
            z-index: 9999;
            background: url(/img/grid/jinruquanping.png) no-repeat;
            width: 40px;
            height: 36px;
            cursor: pointer;
            left: 4px;
            top: 4px;
        }
        .main_right{
            height: 98%;
        }
        .main_bottombody li label:hover{
            color:#1bcafd;
        }
        .inspectionrecordsMain li:hover  .absol{
            color:#1bcafd;
        }
        #xunjians .main_bottombody li:first-child{
            font-size: 16px;
        }
        #shangbaos .main_bottombody li:first-child{
            font-size: 16px;
        }
        .main{
            background: url('/img/grid/bgmainss.png') no-repeat;
            -webkit-background-size: 100% 100%;
            -moz-background-size: 100% 100%;
            -o-background-size: 100% 100%;
            background-size: 100% 100%;
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/bgmainss.png', sizingMethod='scale');
            -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/bgmainss.png', sizingMethod='scale');
        }
        .inspectionrecords{
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/waikuangzhong.png', sizingMethod='scale');
            -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/waikuangzhong.png', sizingMethod='scale');
        }
        .icon-time{
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/xiaoshijianbeijing.png', sizingMethod='scale');
            -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/xiaoshijianbeijing.png', sizingMethod='scale');
        }
        .inspectionrecords .inspectionrecordsMain>li{
            width: 100%;
            height: 29%;
            /*background: url("/img/grid/xiaokuang.png") no-repeat;*/
            -webkit-background-size: 100% 100%;
            -moz-background-size: 100% 100%;
            -o-background-size: 100% 100%;
            position: relative;
            /*background-size: 100% 100%;*/
            /*filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src='/img/grid/xiaokuang.png', sizingMethod='scale');*/
            /*-ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/xiaokuang.png', sizingMethod='scale');*/
        }
        .inspectionrecordsMain ul>li span{
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/timeshijian.png', sizingMethod='scale');
            -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/grid/timeshijian.png', sizingMethod='scale');
        }
        .imgs{
            width:100%;
            height:100%;
            position: absolute;
            top:0px;
            left:0px;
            z-index: 0;
        }
        .inspectionrecordsMain ul>li span{
            float: left;
        }



    </style>
    <script type='text/javascript'>
        var _vds = _vds || [];
        window._vds = _vds;
        (function(){
            _vds.push(['setAccountId', '9c2290a6e6e0e47d']);
            (function() {
                var vds = document.createElement('script');
                vds.type='text/javascript';
                vds.async = true;
                vds.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'assets.growingio.com/vds.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(vds, s);
            })();
        })();
    </script>

</head>
<body id="content">

<div class="main">
    <div class="main_top clearfix">
        <%--<div class="main_left">--%>
            <%--&lt;%&ndash;<ul class="bgtitle">&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li class="fl one"></li>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li class="fl one" style="padding-top: 7%;">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span class="bgactive">17</span>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span class="bgactive">11</span>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span class="bgactive">16</span>&ndash;%&gt;--%>
                <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
            <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
                <%--&lt;%&ndash;天气&ndash;%&gt;--%>
                <%--&lt;%&ndash;<div class="bgtitle">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<label></label>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<div class="bgboxs" style="margin-top: 29px;width: 56%;">&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<div class="daywd" style="color: #fff;font-size: 40px;font-weight: 600;height: 30px;padding-left: 47px; ">-2°</div>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<div class="time" style="color: #b5c0d6;font-size: 16px;padding-left: 7px;height: 27px;margin-top: 10px;"></div>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<div style="color: #b5c0d6; margin-top: 0px;padding-left: 7px;">&ndash;%&gt;--%>
                            <%--&lt;%&ndash;<span style="font-size: 14px;">PM2.5：</span>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;<span  class="pm" style="font-size: 16px;">80  优</span>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;</div>&ndash;%&gt;--%>

                    <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<div class="bgboxs" style="margin-top: -6px;">&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<img class="weather" src="/img/weather/晴.png" alt="" style="">&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<div class="wdfw" style="color: #b5c0d6;font-size: 14px;padding-left: 16px;margin-top: 2px;">晴-6℃~4°℃</div>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
                <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
                <%--&lt;%&ndash;公告&ndash;%&gt;--%>
            <%--&lt;%&ndash;<ul class="videos recentlyReported inspectionrecords" id="gonggao" style="width:100%;height:67%;">&ndash;%&gt;--%>
                <%--&lt;%&ndash;<ul class="clearfix title" style="border: none">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<li style="font-size:16px;margin-top: 8px;float:none;font-family: '微软雅黑'">公告通知</li>&ndash;%&gt;&ndash;%&gt;--%>

                    <%--&lt;%&ndash;&lt;%&ndash;<div class="moreNews" style="float:right;color:#1bcafd;font-size:14px;margin-top: -24px;margin-right:10px;cursor:pointer">更多>></div>&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<div class="newNews" style="float:right;margin-right:10px;color:#1bcafd;font-size:14px;margin-top: -24px;cursor:pointer">新建公告</div>&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<li data-type="2">最近巡检</li>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<div class="imgNews" style="margin:28% auto 0px;display: none;line-height: 100%">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<img src="/img/map/noData.png" alt="" style="display: block;margin:0px auto">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span style="width: 100%;text-align:center;font-size:16px;color:#b5c0d6;display: block;margin-top:15px;">暂无数据</span>&ndash;%&gt;--%>
                <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<div style="height: 80%;overflow: hidden;width: 100%;" id="videoParent">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<iframe  style="border:0;width:1200px;height:800px;" fremeborder="0" marginheight="0px" marginwidth="0px" class="contract_iframe" id="iframe2" scrolling="no"  frameborder="0" width="100%" height="100%"></iframe>&ndash;%&gt;--%>

                    <%--&lt;%&ndash;&lt;%&ndash;<ul class="main_bottombody" id="gong">&ndash;%&gt;&ndash;%&gt;--%>
                        <%--&lt;%&ndash;&lt;%&ndash;<li data-id="9701" style="display: list-item;">&ndash;%&gt;&ndash;%&gt;--%>
                            <%--&lt;%&ndash;&lt;%&ndash;<span class="icon-time" style="overflow: hidden">2018-03-21 14:26:21</span>&ndash;%&gt;&ndash;%&gt;--%>
                            <%--&lt;%&ndash;&lt;%&ndash;<label class="main_bottombodytext">系统管理员 巡检 张莹网格</label>&ndash;%&gt;&ndash;%&gt;--%>
                        <%--&lt;%&ndash;&lt;%&ndash;</li>&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;</ul>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;</div>&ndash;%&gt;--%>

            <%--&lt;%&ndash;&lt;%&ndash;<li class="videoTop" style="position: relative">&ndash;%&gt;&ndash;%&gt;--%>

                    <%--&lt;%&ndash;&lt;%&ndash;<iframe src="/video/videoPlatform?type=yipingsuiji" style="border:0;position: absolute;top: 0;left: 0" fremeborder="0" marginheight="0px" marginwidth="0px" class="contract_iframe" id="iframe1" scrolling="no"  frameborder="0" width="100%" height="100%"></iframe>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;</li>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;<li style="   margin-top: 1.5%;height: 98%; ">&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<iframe  style="border:0;" fremeborder="0" marginheight="0px" marginwidth="0px" class="contract_iframe" id="iframe2" scrolling="no"  frameborder="0" width="100%" height="100%"></iframe>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;</li>&ndash;%&gt;&ndash;%&gt;--%>

            <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
        <%--</div>--%>
        <div class="main_right" >
            <iframe style="width: 100%;height: 100%;"   id="iframe3" ></iframe>
        </div>

    </div>
    <%--<div class="main_bottom clearfix">--%>
        <%--<div class="recentlyReported inspectionrecords" id="xunjians" style=" margin-left: 0.5%;">--%>
            <%--<ul class="clearfix title" style="border: none">--%>
                <%--<li style="font-size:16px;margin-top: 8px;">最近巡检</li>--%>
                <%--<li class="xunjiangengduo" style="float:right;margin-top: 10px;color:#1bcafd;font-size:14px;">更多>></li>--%>
                <%--&lt;%&ndash;<li data-type="2">最近巡检</li>&ndash;%&gt;--%>
            <%--</ul>--%>
            <%--<div style="height: 80%;overflow: hidden;width: 100%;">--%>
                <%--<ul class="main_bottombody">--%>

                <%--</ul>--%>
            <%--</div>--%>

        <%--</div>--%>
        <%--&lt;%&ndash;<div class="recentlyReported inspectionrecords" id="shangbaos" style="width: 24%;">&ndash;%&gt;--%>
            <%--&lt;%&ndash;<ul class="clearfix title" style="border: none">&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li style="font-size:16px;margin-top: 8px;">最近上报</li>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li class="shangbaogengduo" style="float:right;margin-top: 10px;color:#1bcafd;font-size:14px;">更多>></li>&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;<li data-type="2">最近巡检</li>&ndash;%&gt;&ndash;%&gt;--%>
            <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
            <%--&lt;%&ndash;<div style="height: 80%;overflow: hidden;width: 100%;">&ndash;%&gt;--%>
                <%--&lt;%&ndash;<ul class="main_bottombody">&ndash;%&gt;--%>

                <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
            <%--&lt;%&ndash;</div>&ndash;%&gt;--%>

        <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
        <%--&lt;%&ndash;最近上报巡检&ndash;%&gt;--%>
        <%--&lt;%&ndash;<div class="inspectionrecords" id="xunjianjilu">&ndash;%&gt;--%>
            <%--&lt;%&ndash;<ul class="inspectionrecordsMain">&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li id="inspectionRecord" style="margin-top: 6%; cursor: pointer">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<img src="/img/grid/xiaokuang.png" alt="" class="imgs">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span class="absol">巡检统计</span>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<ul>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<li class="liwidth">&ndash;%&gt;--%>

                        <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<li class="libottomwidth" >条</li>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>

                <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<li id="EReport" style="margin-top: 6%;cursor: pointer">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<img src="/img/grid/xiaokuang.png" alt=""  class="imgs">&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<span class="absol">事件上报</span>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;<ul>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<li class="liwidth">&ndash;%&gt;--%>

                        <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
                        <%--&lt;%&ndash;<li class="libottomwidth" >条</li>&ndash;%&gt;--%>
                    <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
                <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;<li id="handling" style="margin-top: 6%;cursor: pointer">&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<img src="/img/grid/xiaokuang.png" alt=""  class="imgs">&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<span class="absol">事件指派统计</span>&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;<ul>&ndash;%&gt;&ndash;%&gt;--%>
                        <%--&lt;%&ndash;&lt;%&ndash;<li class="liwidth">&ndash;%&gt;&ndash;%&gt;--%>

                        <%--&lt;%&ndash;&lt;%&ndash;</li>&ndash;%&gt;&ndash;%&gt;--%>
                        <%--&lt;%&ndash;&lt;%&ndash;<li class="libottomwidth">条</li>&ndash;%&gt;&ndash;%&gt;--%>
                    <%--&lt;%&ndash;&lt;%&ndash;</ul>&ndash;%&gt;&ndash;%&gt;--%>
                <%--&lt;%&ndash;&lt;%&ndash;</li>&ndash;%&gt;&ndash;%&gt;--%>
            <%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
        <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
        <%--&lt;%&ndash;<div class="inspectionrecords" id="yejipaihang">&ndash;%&gt;--%>
            <%--&lt;%&ndash;<p style="font-size:16px;color: #fff;margin-top: 10px;">待办事件</p>&ndash;%&gt;--%>
            <%--&lt;%&ndash;<div id="main" ></div>&ndash;%&gt;--%>
        <%--&lt;%&ndash;</div>&ndash;%&gt;--%>
    <%--</div>--%>
</div>
<script src="../js/jquery/jquery.cookie.js"></script>
<script>
    $(function(){

        setInterval(function(){
            var date=new Date();
            var month=date.getMonth()+1;
            var x=date.getFullYear()+"/"+month+"/"+date.getDate();
            var shi=date.getHours()<10?'0'+date.getHours():date.getHours()
            var fen= date.getMinutes()<10?'0'+date.getMinutes():date.getMinutes();
            var miao=date.getSeconds()<10?'0'+date.getSeconds():date.getSeconds();
            $('.time').html(x+"&nbsp;&nbsp;&nbsp;"+shi+':'+fen+':'+miao);
        },1000)



        // $('#main').css('width',$('#yejipaihang').width()-50);

        $('.shangbaogengduo').click(function () {
            window.open('/street/eventQuery1?type=all')
        })

        $('.xunjiangengduo').click(function () {
            window.open('/street/queryStatisticsTwo')
        })

//         $('#inspectionRecord').click(function () {
// //            $.cookie('menuId','d245' , { expires: 7 , path: '/' });
//             window.open('/street/statistics')
//             event.stopPropagation();
//         })
        $('#EReport').click(function () {
//            $.cookie('menuId','d246' , { expires: 7 , path: '/' });
            window.open('/street/statisticsOne')
            event.stopPropagation();
        })
        $('#handling').click(function () {
//            $.cookie('menuId','d248' , { expires: 7 , path: '/' });
            window.open('/street/assignStatistics')
            event.stopPropagation();
        })
        // $('.bgtitle label').click(function () {
        //     if(bools){
        //         $(this).addClass('active')
        //         requestFullScreens(document.getElementById('content'))
        //     }else {
        //         $(this).removeClass('active')
        //         exitFulls()
        //     }
        // })


        $(document).on('click','#gong li',function(){
            var id=$(this).attr('data-id');
            $.get('/environmentaNewsTisTo/getOneById',{newsId:id},function(res){
                var data=res.object;
//                window.open('/environmentaNewsTisTo/detail?newsId='+id,'_blank','width=900,height=700')
                layer.open({
                    title:false,
                    type:1,
                    closeBtn:0,
                    content:'<div class="layerXunJian">' +
                    '<a href="javascript:void(0)"><span>x</span>关闭</a>' +
                    '<div class="gTitle" style="font-size:25px;font-weight:bold;color:#fff;text-align: center;line-height: 30px">'+data.subject+'</div>'+
                    '<p class="gTitle" style="font-size:14px;color:#fff;text-align: right;line-height: 30px;">发布人：'+data.providerName+'</p>'+
                    '<p class="gTitle" style="font-size:14px;color:#fff;text-align: right;line-height: 30px;">发布时间：'+data.newsDateTime+'</p>'+
                    '<div class="gText" style="color:#fff!important;margin-top: 30px;">'+data.content+'</div>'+
                    '</div>',
                    area:['700px','565px'],
                    shade:0,
                    shadeClose:true,
                    success:function (layerDom,index) {
                        $('.biJiao').attr('img1',$('.pic').eq(0).find('img').eq(0).attr('src'))
                        $('.biJiao').attr('img2',$('.pic').eq(1).find('img').eq(0).attr('src'))
                        $('.layerXunJian').parent().parent().prop('id','layerXunJian')
                        $('.layerXunJian>a').click(function () {
                            $(layerDom).remove();
                        })
                    }
                })


            })
        })




        $(document).on('click','.main_bottombody li',function () {
            var str='';
            var obj={};
            if($(this).parent().parent().parent().prop('id')=='xunjians'){
                str='/gridCheck/selectByPrimaryKey';
                obj.checkId=$(this).attr('data-id')
            }else {
                str='/gridEvent/selectByPrimaryKey';
                obj.eventId =$(this).attr('data-id')
            }
            var me=this;
            $.get(str,obj,function (json) {
                if(json.flag){
                    if($(me).parent().parent().parent().prop('id')=='xunjians'){
                        layer.open({
                            title:false,
                            type:1,
                            closeBtn:0,
                            content:'<div class="layerXunJian">' +
                            '<a href="javascript:void(0)"><span>x</span>关闭</a>' +
                            '<ul>' +
                            '<li class="titles">' +
                            '<p>事件巡检表</p>' +
//                            '<span><img src="/img/grid/zuijinshangbao.png" alt=""><label>最近上报:</label><label>'+json.data.dateTime+'</label>  </span>' +
                            '</li>' +
                            '<li>' +
                            '<label>社区名称：</label>' +
                            '<span>'+json.data.infoName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>网格名称：</label>' +
                            '<span>'+json.data.gridName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>检查类型：</label>' +
                            '<span>'+json.data.codeName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>位置：</label>' +
                            '<span>'+json.data.location+'</span>' +
                            '</li>' +
                            '<li class="clearfix pic">' +
                            '<label style="float: left">整改前照片：</label>' +
                            '<ul class="clearfix" style="float: left">'+function () {
                                var arr=json.data.attachments1;
                                var strs='';
                                for(var i=0;i<arr.length;i++){
                                    strs+='<li><img src="/xs?'+arr[i
                                            ].attUrl+'" alt=""></li>'
                                }
                                return strs
                            }()+'' +
                            '</ul>' +
                            '</li>' +
                            '<li class="clearfix pic">' +
                            '<label style="float: left">整改后照片：</label>' +
                            '<ul class="clearfix" style="float: left;position: relative">'+function () {
                                var arrBefore=json.data.attachments1;
                                var arr=json.data.attachments2;
                                var strs='';
                                for(var i=0;i<arr.length;i++){
                                    strs+='<li><img src="/xs?'+arr[i].attUrl+'" alt=""> <a href="javascript:;" class="biJiao" style="color: #65efff;text-decoration: none;display: inline-block;position:absolute;top:33px;left: 100px;font-size:16px;">点击对比</a></li>'
                                }
                                return strs
                            }()+'' +
                            '</ul>' +
                            '</li>' +
                            '</ul>' +
                            '</div>',
                            area:['700px','565px'],
                            shade:0,
                            shadeClose:true,
                            success:function (layerDom,index) {
                                $('.biJiao').attr('img1',$('.pic').eq(0).find('img').eq(0).attr('src'))
                                $('.biJiao').attr('img2',$('.pic').eq(1).find('img').eq(0).attr('src'))
                                $('.layerXunJian').parent().parent().prop('id','layerXunJian')
                                $('.layerXunJian>a').click(function () {
                                    $(layerDom).remove();
                                })
                            }
                        })
                    }else {
                        layer.open({
                            title:false,
                            type:1,
                            closeBtn:0,
                            content:'<div class="layerXunJian">' +
                            '<a href="javascript:void(0)"><span>x</span>关闭</a>' +
                            '<ul>' +
                            '<li class="titles">' +
                            '<p>事件上报表</p>' +
                            '<span><img src="/img/grid/zuijinshangbao.png" alt=""><label>最近上报:</label><label>'+json.data.dateTime+'</label>  </span>' +
                            '</li>' +
                            '<li>' +
                            '<label>所属社区：</label>' +
                            '<span>'+json.data.gridName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>提交人：</label>' +
                            '<span>'+json.data.userName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>大事件类型：</label>' +
                            '<span>'+function(){
                                if(json.data.eventTypeParent=='appearance'){
                                    return '市容环境'
                                }else if(json.data.eventTypeParent=='bazaar'){
                                    return '秩序环境'
                                }else if(json.data.eventTypeParent=='livelihood'){
                                    return '设施环境'
                                }else if(json.data.eventTypeParent=='zoology'){
                                    return '生态环境'
                                }else if(json.data.eventTypeParent=='protection'){
                                    return '环保环境'
                                }
                            }()+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>小事件类型：</label>' +
                            '<span>'+json.data.codeName+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>事件描述：</label>' +
                            '<span>'+json.data.eventInfo+'</span>' +
                            '</li>' +
                            '<li>' +
                            '<label>位置：</label>' +
                            '<span>'+json.data.location+'</span>' +
                            '</li class="pic">' +
                            '<li class="clearfix pic">' +
                            '<label style="float: left">问题图片：</label>' +
                            '<ul class="clearfix" style="float: left">'+function () {
                               var arr=json.data.attachments2;
                               var strs='';
                               for(var i=0;i<arr.length;i++){
                                   strs+='<li><img src="/xs?'+arr[i].attUrl+'" alt=""></li>'
                               }
                               return strs
                            }()+'' +
                            '</ul>' +
                            '</li>' +
                            '</ul>' +

                            '</div>',
                            area:['700px','565px'],
                            shade:0,
                            shadeClose:true,
                            success:function (layerDom,index) {
                                $('.layerXunJian').parent().parent().prop('id','layerXunJian')
                                $('.layerXunJian>a').click(function () {
                                    $(layerDom).remove();
                                })
                            }
                        })
                    }

                }
            },'json')


        })


        $.ajax({
//            type: "post",
//            url: "/fixForm/selectFlowCounts",
//            data: {},
//            success: function(res){
//                var num1 = parseFloat(res.data.num1Percent);
//                var num2 = parseFloat(res.data.num2Percent);
//                $('#main').highcharts({
//                    chart: {
//                        backgroundColor: null,
//                        plotBackgroundColor: null,
//                        plotBorderWidth: null,
//                        plotShadow: false,
//                    },
//                    credits:{
//                        enabled:false
//                    },
//                    title: {
//                        text: ''
//                    },
//                    tooltip: {
//                        headerFormat: '{series.name}<br>',
//                        pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
//                    },
//                    plotOptions: {
//                        pie: {
//                            allowPointSelect: true,
//                            cursor: 'pointer',
//                            dataLabels: {
//                                enabled: true,
//                                format: '<b>{point.name}</b>: {point.percentage:.1f} %',
//                                style: {
//                                    "color": "#fff", "fontSize": "11px", "fontWeight": "bold", "textOutline": "1px 1px contrast"
//                                },
//                                distance: 5
//                            },
//                            minSize:100,
//                            showInLegend: true,
//                            events:{
//                                click:function (e) {
////                                    console.log(e.point)
//                                }
//                            }
//
//                        }
//                    },
//                    series: [{
//                        type: 'pie',
//                        name: '超时事件统计',
//                        colors: ['red', '#999'],
//                        data: [
//                            ['已超时',   num1],
//                            ['未超时',       num2]
//                        ]
//                    }]
//                });
            type: "post",
            url: "/gridEvent/getStatisticsByGridEventType",
            data: {ypeDate:3,queryType:2},
            success: function(res){

//                var myChart = echarts.init(document.getElementById('main'));
//
//
//                var option = {
//                    tooltip: {
//                        trigger: 'item',
//                        formatter: "{a} <br/>{b}: {c} ({d}%)"
//                    },
//                    legend: {
//                        orient: 'vertical',
//                        itemWidth:10,
//                        itemHeight:8,
//                        x: 'left',
//                        data: [res.datas[0].name, res.datas[1].name, res.datas[2].name, res.datas[3].name, res.datas[4].name],
//                        textStyle:{
//                            color:['#fff'],
//                        }
//                    },
//                    series: [{
//                        name: '访问来源',
//                        type: 'pie',
//                        center:['50%','50%'],
//                        radius: ['50%', '70%'],
//                        avoidLabelOverlap: false,
//                        label: {
//                            normal: {
//                                show: false,
//                                position: 'center'
//                            },
//                            emphasis: {
//                                show: true,
//                                textStyle: {
//                                    fontSize: '16',
//                                    fontWeight: 'bold'
//                                }
//                            }
//                        },
//                        labelLine: {
//                            normal: {
//                                show: false
//                            }
//                        },
//                        data: [{
//                            value: res.datas[0].y,
//                            name: res.datas[0].name,
//                            itemStyle:{
//                                normal:{color:'#3d91e4'}
//                            }
//                        },
//                            {
//                                value: res.datas[1].y,
//                                name: res.datas[1].name,
//                                itemStyle:{
//                                    normal:{color:'#ed5859'}
//                                }
//                            },
//                            {
//                                value: res.datas[2].y,
//                                name: res.datas[2].name,
//                                itemStyle:{
//                                    normal:{color:'#c4da4c'}
//                                }
//                            },
//                            {
//                                value: res.datas[3].y,
//                                name: res.datas[3].name,
//                                itemStyle:{
//                                    normal:{color:'#4bcc94'}
//                                }
//                            },
//                            {
//                                value: res.datas[4].y,
//                                name: res.datas[4].name,
//                                itemStyle:{
//                                    normal:{color:'#ef9a54'}
//                                }
//                            }
//                        ]
//                    }]
//                };
//                myChart.setOption(option);
                var chart = null;
                $(function () {
                    function char(){
                        $('#main').highcharts({


                            chart: {
                                backgroundColor: null,
                                plotBackgroundColor: null,
                                plotBorderWidth: null,
                                plotShadow: false,
                                spacing : [30, 0 , 0, 0],

                            },
                            title: {
                                floating:true,
                                text: ' '
                            },
                            credits:{
                                enabled:false
                            },
                            tooltip: {
                                pointFormat: '<span>{series.name}:</span> <b style="color: #000;">{point.percentage:.1f}%</b>',
                                style: {
                                    color: "#000",
                                    fontSize: "12px",
                                    fontWeight: "blod",
                                    fontFamily: "Courir new"
                                }
                            },
                            plotOptions: {
                                pie: {
                                    allowPointSelect: true,
                                    cursor: 'pointer',
                                    dataLabels: {
                                        enabled: true,
                                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                                        style: {
                                            "color": "#fff", "fontSize": "11px", "fontWeight": "bold", "textOutline": "1px 1px contrast"
                                        }

                                    }
//                                point: {
//                                    events: {
//                                        mouseOver: function(e) {  // 鼠标滑过时动态更新标题
//                                            // 标题更新函数，API 地址：https://api.hcharts.cn/highcharts#Chart.setTitle
//                                            chart.setTitle({
//                                                text: e.target.name+ '\t'+ e.target.y + ' %'
//                                            });
//                                        }
//                                        ,
//                                         click: function(e) { // 同样的可以在点击事件里处理
//                                             chart.setTitle({
//                                                 text: e.point.name+ '\t'+ e.point.y + ' %'
//                                             });
//                                         }
//                                    }
//                                },
                                }
                            },
                            series: [{
                                type: 'pie',
                                innerSize: '55%',
                                name: ' ',
                                data: [
                                    ['<span data-id="'+res.datas[0].id+'">'+res.datas[0].name+'</span>',res.datas[0].y],
                                    ['<span data-id="'+res.datas[1].id+'" >'+res.datas[1].name+'</span>',    res.datas[1].y],
                                    ['<span data-id="'+res.datas[2].id+'">'+res.datas[2].name+'</span>',    res.datas[2].y],
                                    ['<span data-id="'+res.datas[3].id+'">'+res.datas[3].name+'</span>',    res.datas[3].y],
                                    ['<span data-id="'+res.datas[4].id+'">'+res.datas[4].name+'</span>',  res.datas[4].y]
                                ],
//                            colors: ['#3d91e4', '#ed5859', '#c4da4c', '#4bcc94', '#ef9a54']
                                colors: ['blue', 'red', 'green', 'yellow', 'purple'],
                                events: {
                                    click: function(e) {
                                        window.open('/street/toDoEvent?id='+$(e.point.name).attr('data-id'))
                                    }
                                }

                            }]
                        },function(c) {
                            // 环形图圆心
                            var centerY = c.series[0].center[1],
                                titleHeight = parseInt(c.title.styles.fontSize);
                            c.setTitle({
                                y:centerY + titleHeight/2
                            });
                            chart = c;
                        });
                    }
                    function noDate(id){
                        Highcharts.chart(id, {
                            chart: {
                                type: 'pie',
                                backgroundColor: null,
                                plotBackgroundColor: null,
                                plotBorderWidth: null,
                                plotShadow: false,
                                borderWidth:null,
//                                spacing : [30, 0 , 0, 0],
                            },
                            title: {
                                text: ''
                            },
                            legend: {
                                enabled:true,
                                align: "center", //程度标的目标地位
                                verticalAlign: "bottom", //垂直标的目标地位
                            },
                            exporting:{
                                enabled:false
                            },
                            tooltip: {
                                enabled:false
                            },
                            credits: {
                                enabled:false
                            },
                            colors:[
                                'gray'//第一个颜色，欢迎加入Highcharts学习交流群294191384
                            ],
                            plotOptions: {
                                pie:{
                                    innerSize:'30',
                                    depth:35,
                                    name:'暂无数据',
                                    dataLabels:{
                                        enabled:false
                                    },
                                    showInLegend:true
                                },

                            },
                            series: [{
                                type:'pie',
                                data:[ {name:'暂无数据',y:1}]
                            }]
                        });
                    }
                    if(res.datas[0].y==0 && res.datas[1].y ==0 && res.datas[2].y==0 && res.datas[3].y==0 && res.datas[4].y==0){
                        noDate('main')
                    }else{
                        char();
                    }
                });

            }
        })

        /*******************天气***********************************/
        // $.ajax({
        //     type: "post",
        //     url: "/widget/getWidgetToDoWeather",
        //     data: {cityName:'邳州市'},
        //     success: function(res){
        //         var pmTwoPointFive = res.object[0].object.pmTwoPointFive;
        //         var tempertureOfDay = res.object[0].object.tempertureOfDay;
        //         var weather = res.object[0].object.weather;
        //         var tempertureNow = res.object[0].object.tempertureNow;
        //         var pmTwoPointFiveString = res.object[0].object.pmTwoPointFiveString;
        //         $('.daywd').html(tempertureNow+'°');
        //         $('.wdfw').html(weather+' '+tempertureOfDay);
        //         $('.pm').html(pmTwoPointFive+' '+pmTwoPointFiveString);
        //         if(weather == '阵雨'){
        //             var weather = '大雨';
        //         }else if(weather == '阵雪'){
        //             var weather = '大雪';
        //         }else if(weather == '雷阵雨伴有冰雹'){
        //             var weather = '雷阵雨';
        //         }else if(weather == '大暴雨'||weather == '特大暴雨'){
        //             var weather = '暴雨';
        //         }else if(weather == '阵雪'){
        //             var weather = '大雪';
        //         }else if(weather == '冻雨'){
        //             var weather = '大雨';
        //         }else if(weather == '沙尘暴'){
        //             var weather = '扬沙';
        //         }else if(weather == '小雨-中雨'){
        //             var weather = '中雨';
        //         }else if(weather == '中雨-大雨'){
        //             var weather = '大雨';
        //         }else if(weather == '大雨-暴雨'){
        //             var weather = '暴雨';
        //         }else if(weather == '暴雨-大暴雨'){
        //             var weather = '暴雨';
        //         }else if(weather == '大暴雨-特大暴雨'){
        //             var weather = '暴雨';
        //         }else if(weather == '小雪-中雪'){
        //             var weather = '中雪';
        //         }else if(weather == '中雪-大雪'){
        //             var weather = '大雪';
        //         }else if(weather == '大雪-暴雪'){
        //             var weather = '暴雪';
        //         }else if(weather == '浮尘'||weather == '强沙尘暴'){
        //             var weather = '扬沙';
        //         }else if(weather == '晴转多云'){
        //             var weather = '多云';
        //         }else{
        //             var weather = '多云';
        //         }
        //         $('.weather').attr('src','/img/weather/'+weather+'.png');
        //     }
        // });


    })

</script>

<script>
    var bools=true;
    function requestFullScreens(element) {
        bools=false;
        // 判断各种浏览器，找到正确的方法
        var requestMethod = element.requestFullScreen || //W3C
            element.webkitRequestFullScreen || //Chrome等
            element.mozRequestFullScreen || //FireFox
            element.msRequestFullScreen; //IE11
        if (requestMethod) {
            requestMethod.call(element);
        }
        else if (typeof window.ActiveXObject !== "undefined") {//for Internet Explorer
            var wscript = new ActiveXObject("WScript.Shell");
            if (wscript !== null) {
                wscript.SendKeys("{F11}");
            }
        }
    }
    function exitFulls() {
        bools=true;
        // 判断各种浏览器，找到正确的方法
        var exitMethod = document.exitFullscreen || //W3C
            document.mozCancelFullScreen || //Chrome等
            document.webkitExitFullscreen || //FireFox
            document.webkitExitFullscreen; //IE11
        if (exitMethod) {
            exitMethod.call(document);
        }
        else if (typeof window.ActiveXObject !== "undefined") {//for Internet Explorer
            var wscript = new ActiveXObject("WScript.Shell");
            if (wscript !== null) {
                wscript.SendKeys("{F11}");
            }
        }
    }






















    var bool=true;
    function requestFullScreen(element) {
        bool=false;
        // 判断各种浏览器，找到正确的方法
        var requestMethod = element.requestFullScreen || //W3C
            element.webkitRequestFullScreen || //Chrome等
            element.mozRequestFullScreen || //FireFox
            element.msRequestFullScreen; //IE11
        if (requestMethod) {
            requestMethod.call(element);
        }
        else if (typeof window.ActiveXObject !== "undefined") {//for Internet Explorer
            var wscript = new ActiveXObject("WScript.Shell");
            if (wscript !== null) {
                wscript.SendKeys("{F11}");
            }
        }

        $('.main_left').hide();
        $('.main_bottom').hide();
        $('.main_right').width(document.documentElement.clientWidth || document.body.clientWidth)

        $('.main_right').height((document.documentElement.clientHeight || document.body.clientHeight)+100)


    }
    function exitFull() {
        bool=true;
        // 判断各种浏览器，找到正确的方法
        var exitMethod = document.exitFullscreen || //W3C
            document.mozCancelFullScreen || //Chrome等
            document.webkitExitFullscreen || //FireFox
            document.webkitExitFullscreen; //IE11
        if (exitMethod) {
            exitMethod.call(document);
        }
        else if (typeof window.ActiveXObject !== "undefined") {//for Internet Explorer
            var wscript = new ActiveXObject("WScript.Shell");
            if (wscript !== null) {
                wscript.SendKeys("{F11}");
            }
        }

        $('.main_left').show();
        $('.main_bottom').show();
        $('.main_right').width($('.main_top').width()-$('.main_left').width()-20)
        $('.main_bottom').height($('.main').height()-$('.main_top').height()-33)
        $('.main_right').height('98%')
//        autodivheights(function () {
//            $('.main_right').height($('.main_left').height())
//            $('.main_bottom').height($('.main').height()-$('.main_top').height())
//        })
    }


    function autodivheights(fn) {
        $('.main_right').width($('.main_top').width()-$('.main_left').width()-0)
        // $('.main_right').width($('.main_top').width()-$('.main_left').width()-20)
        
        $('.main_bottom').height($('.main').height()-$('.main_top').height())
//        $('.main_right').height($('.main_left').height())
        if(typeof fn=='function'){
            fn()
        }
    }


    function throttle(method) {
        clearTimeout(method.tId);
        method.tId=setTimeout(function(){
            method.call();
        },100);
    }




//    window.onresize=function () {
//        throttle(autodivheights)
//    };

    autodivheights()
    function formatDate(now) {
        var year=now.getFullYear();

        var month=now.getMonth()+1;
        var date=now.getDate();
        var hour=now.getHours();
        var minute=now.getMinutes();
        var second=now.getSeconds();
        var obj={
            year:year,
            month:month,
            date:date,
            hour:hour,
            minute:minute,
            second:second
        };
        return  obj;

//        "20"+year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
    }

//    公告通知
    function getNews(){
        $.ajax({
            url:'/environmentaNewsTisTo/newsManage',
            data:{
                    read:"",
                typeId:"",
                nTime:"",
                page:1,
                pageSize:5,
                useFlag:true,
                newsTime:"",
                lastEditTime:"",
                    content:"",
                        subject:"",
                        fromId:""},
            dataType:'json',
            success:function(res){
                var data=res.obj;
                var str = '';
                if(data == ''){
                    $('.imgNews').show()
                }else{
                    $('.imgNews').hide()
                    for(var i=0;i<data.length;i++){
                        str += ' <li data-id="'+data[i].newsId+'" style="display: list-item;">' +
                            '                            <span class="icon-time" style="overflow: hidden">'+data[i].newsDateTime+'</span>' +
                            '                            <label class="main_bottombodytext">'+data[i].subject+'</label>' +
                            '                        </li>'
                    }
                    $('#gong').html(str)
                }

            }
        })
    }
    getNews();
    $('.newNews').click(function(){
        window.open('/notice/noticeManagement','_blank')
    })
    $('.moreNews').click(function(){
        window.open('/notice/allNotifications','_blank')
    })


//    $('#gong').on('click','li',function(){
//        var id=$(this).attr('data-id')
//        $.get('/environmentaNewsTisTo/getOneById',{newsId:id},function(res){
//            var data=res.obj;
//
//        })
//    })



    function timeajax(str,num) {
        $.get(str,function (json) {
            if(json.flag){
                var str='';
                var arr=json.datas
                for(var i=0;i<arr.length;i++){
                    if(num==1){
                        str+=' <li data-id="'+arr[i].eventId+'">\
                        <span  class="icon-time" style="overflow: hidden">'+arr[i].dateTime+'</span>\
                    <label class="main_bottombodytext">'+arr[i].codeName+'</label> </li>'
                    }else {
                        str+=' <li data-id="'+arr[i].checkId+'">\
                        <span class="icon-time" style="overflow: hidden">'+arr[i].checkTime+'</span>\
                    <label class="main_bottombodytext">'+arr[i].userName+' 巡检 '+arr[i].gridName+'</label> </li>'
                    }

                }
                if(num==1){
                    $('#shangbaos .main_bottombody').html(str)

                }else {
                    $('#xunjians .main_bottombody').html(str)

                }

            }
        },'json')
    }
    var timer=setInterval(function(){
        timeajax('/gridEvent/getLastEventMsg',1)
        timeajax('/gridCheck/getLastCheckMsg',2)
    },300000)


    $("#xunjians .main_bottombody").hover(function(){
        clearInterval(scrtime);
    },function(){
        scrtime=setInterval(function(){
            $ul=$("#xunjians .main_bottombody");
            liheight=$ul.find("li:first").height();
            $ul.animate({marginTop:'-46px'},500,function(){

                $ul.find("li:first").appendTo("#xunjians .main_bottombody")
                if ((screen.width == 1024) && (screen.height == 768)) {
                    $ul.find("li:first").css('margin-top','18px');//此分辨率下你需要的操作
                } else if ((screen.width == 1366) && (screen.height == 900)) {
                   $ul.find("li:first").css('margin-top','10px')
                }
                $ul.find("li:first").hide();
                $ul.css("margin-top","0px");
                $ul.find("li:first").show();
                $ul.find("li:first").css({'font-size':'16px'}).siblings().css({'font-size':'12px'})
            });
        },3000);
    }).trigger("mouseleave");

    $("#shangbaos .main_bottombody").hover(function(){
        clearInterval(scrtime2);
    },function(){
        scrtime2=setInterval(function(){
            $ul2=$("#shangbaos .main_bottombody");
            liheight=$ul2.find("li:first").height();
            $ul2.animate({marginTop:'-43px'},500,function(){
                $ul2.find("li:first").appendTo("#shangbaos .main_bottombody")
                if ((screen.width == 1024) && (screen.height == 768)) {
                    $ul.find("li:first").css('margin-top','18px');//此分辨率下你需要的操作
                } else if ((screen.width == 1366) && (screen.height == 900)) {
                    $ul.find("li:first").css('margin-top','10px')
                }
                $ul2.find("li:first").hide();
                $ul2.css("margin-top","0px");
                $ul2.find("li:first").show();
                $ul2.find("li:first").css({'font-size':'16px'}).siblings().css({'font-size':'12px'})
            });
        },3000);
    }).trigger("mouseleave");







    var timer=null;

    function timecheck() {
        var timeobj=formatDate(new Date());

        $($('.bgtitle li')[0]).html(timeobj.year+'年'+timeobj.month+'月'+timeobj.date+'日');
        var strtime='';
        for(var key in timeobj){
            if(key=='hour'||key=='minute'||key=='second'){
                strtime+='<span class="bgactive">'+timeobj[key]+'</span>'
            }

        }

        $($('.bgtitle li')[1]).html(strtime);
    }
    $(function () {
        var timeobj=formatDate(new Date());

        $($('.bgtitle li')[0]).html(timeobj.year+'年'+timeobj.month+'月'+timeobj.date+'日');
        var strtime='';
        for(var key in timeobj){
            if(key=='hour'||key=='minute'||key=='second'){
                strtime+='<span class="bgactive">'+timeobj[key]+'</span>'
            }

        }

        $($('.bgtitle li')[1]).html(strtime);
        //timer=setInterval(timecheck,1000)



        $.get('/gridCheck/gridCheckCount',function (json) {
            if(json.flag){

                var strjiluarr=json.data.gridCheckCount.split('');
                var strshangbaoarr=json.data.gridEevent1Count.split('');
                var strchuliarr=json.data.gridEeventCount.split('');
                var strjilu='';
                var strshangbao='';
                var strchuli='';
                for(var i=0;i<strjiluarr.length;i++){
                    strjilu+='<span>'+strjiluarr[i]+'</span>'
                }
                for(var i=0;i<strshangbaoarr.length;i++){
                    strshangbao+='<span>'+strshangbaoarr[i]+'</span>'
                }
                for(var i=0;i<strchuliarr.length;i++){
                    strchuli+='<span>'+strchuliarr[i]+'</span>'
                }
                $($('#xunjianjilu .inspectionrecordsMain>li')[0]).find('.liwidth').html(strjilu)
                $($('#xunjianjilu .inspectionrecordsMain>li')[1]).find('.liwidth').html(strchuli)
                $($('#xunjianjilu .inspectionrecordsMain>li')[2]).find('.liwidth').html(strshangbao)
            }
        },'json')




//        $.get('/gridEvent/getCountByname?timeType=month',function (json) {
//            if(json.flag){
//                var str='';
//                var arr=json.datas;
//                for(var i=0;i<arr.length;i++){
//                    str+='<li>\
//                        <div>\
//                        <img src="'+function () {
//                            if(arr[i].img==0){
//                                return '/img/user/boy.png'
//                            }else if(arr[i].img==1){
//                                return '/img/user/girl.png'
//                            }else {
//                                return '/img/user/'+arr[i].img
//                            }
//                        }()+'" alt="">\
//                        </div>\
//                        <ul>\
//                        <li class="top"><span>'+arr[i].name+'</span><label>'+arr[i].y+'</label></li>\
//                        <li class="buttom">\
//                        <span></span>\
//                        <label style="width:'+arr[i].y+'%;"></label>\
//                        </li>\
//                        </ul>\
//                        </li>'
//                }
//
//                $('#yejipaihang .main_bottombody').html(str)
//            }
//        },'json')



        $.get('/fixForm/selectCounts',function (json) {
            if(json.flag){

            }
        },'json')


        timeajax('/gridEvent/getLastEventMsg',1)
        timeajax('/gridCheck/getLastCheckMsg',2)
        $('.recentlyReported ul.title li').click(function () {
            $(this).siblings('li').removeClass('active')
            $(this).addClass('active')
            if($(this).attr('data-type')==1){
                timeajax('/gridEvent/getLastEventMsg',1)
            }else {
                timeajax('/gridCheck/getLastCheckMsg',2)
            }
        })


        $('#container').highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                backgroundColor: 'rgba(0,0,0,0)'
            },
            title: {
                text: '<span class="chiclass" style="background: #1e9de0"></span><label class="citext">合格达标</label>' +
                '<span class="chiclass" style="background: #ef563d"></span><label class="citext">隐患整改</label>' +
                '<span class="chiclass" style="background: #f2ce2f"></span><label class="citext">隐患严重</label>',
                align:'left',
                useHTML:true,
                style:{
                    color:'#fff'
                }
            },
            tooltip: {
//                headerFormat: '{series.name}<br>',
                pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || '#fff'
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                name: 'zhu',
                data: [
                    {
                        name:'合格达标',
                        y:150,
                        color:'#1e9de0',
                        sliced: true,
                        selected: true
                    },
                    {
                        name: '隐患整改',
                        y: 8,
                        color:'#ef563d'
                    },
                    {
                        name:'隐患严重',
                        y:3,
                        color:'#f2ce2f'
                    }
                ]
            }]
        });



//        $.ajax({
//            type: 'post',
//            url: '/video/selAllVideoDevice',
//            dataType: 'json',
//            success: function (reg) {
//                var data=reg.obj;
//                var myArray=new Array();
//                for(var i=0;i<data.length;i++){
//                    var res={
//                        ip:data[i].ip,
//                        ipAport:data[i].ipAport,
//                        userName:data[i].userName,
//                        password:data[i].password,
//                        streamType:data[i].streamType
//                    }
//                    myArray.push(res);
//                }
////                if(myArray.length>=5){
//                    $("#iframe1").attr("src", '/video/video?ip=' + myArray[0].ip + '&ipAport=' + myArray[0].ipAport + '&userName=' + myArray[0].userName + '&password=' + myArray[0].password + '&streamType=' + myArray[0].streamType)
//                    $("#iframe2").attr("src", '/video/video?ip=' + myArray[1].ip + '&ipAport=' + myArray[1].ipAport + '&userName=' + myArray[1].userName + '&password=' + myArray[1].password + '&streamType=' + myArray[0].streamType)
//                    $("#iframe3").attr("src", '/video/video?ip=' + myArray[0].ip + '&ipAport=' + myArray[0].ipAport + '&userName=' + myArray[0].userName + '&password=' + myArray[0].password + '&streamType=' + myArray[0].streamType)
//                    $("#iframe4").attr("src", '/video/video?ip=' + myArray[1].ip + '&ipAport=' + myArray[1].ipAport + '&userName=' + myArray[1].userName + '&password=' + myArray[1].password + '&streamType=' + myArray[0].streamType)
//                    $("#iframe5").attr("src", '/video/video?ip=' + myArray[0].ip + '&ipAport=' + myArray[0].ipAport + '&userName=' + myArray[0].userName + '&password=' + myArray[0].password + '&streamType=' + myArray[0].streamType)
////                    $("#iframe2").attr("src", '/video/video?ip=' + myArray[1].ip + '&ipAport=' + myArray[1].ipAport + '&userName=' + myArray[1].userName + '&password=' + myArray[1].password + '&streamType=' + myArray[1].streamType)
////                    $("#iframe3").attr("src", '/video/video?ip=' + myArray[2].ip + '&ipAport=' + myArray[2].ipAport + '&userName=' + myArray[2].userName + '&password=' + myArray[2].password + '&streamType=' + myArray[2].streamType)
////                    $("#iframe4").attr("src", '/video/video?ip=' + myArray[3].ip + '&ipAport=' + myArray[3].ipAport + '&userName=' + myArray[3].userName + '&password=' + myArray[3].password + '&streamType=' + myArray[3].streamType)
////                    $("#iframe5").attr("src", '/video/video?ip=' + myArray[4].ip + '&ipAport=' + myArray[4].ipAport + '&userName=' + myArray[4].userName + '&password=' + myArray[4].password + '&streamType=' + myArray[4].streamType)
////                }else{
////                    for(var i=0;i<myArray.length;i++){
////                        $("#iframe"+i).attr("src", '/video/video?ip=' + myArray[i].ip + '&ipAport=' + myArray[i].ipAport + '&userName=' + myArray[i].userName + '&password=' + myArray[i].password + '&streamType=' + myArray[i].streamType)
////                    }
////                }
//
////                window.setInterval(function () {
////                    if(myArray.length>=5){
////                        $("#iframe1").attr("src", '/video/video?ip=' + myArray[1].ip + '&ipAport=' + myArray[0].ipAport + '&userName=' + myArray[0].userName + '&password=' + myArray[0].password + '&streamType=' + myArray[0].streamType)
////                        $("#iframe2").attr("src", '/video/video?ip=' + myArray[2].ip + '&ipAport=' + myArray[1].ipAport + '&userName=' + myArray[1].userName + '&password=' + myArray[1].password + '&streamType=' + myArray[1].streamType)
////                        $("#iframe3").attr("src", '/video/video?ip=' + myArray[3].ip + '&ipAport=' + myArray[2].ipAport + '&userName=' + myArray[2].userName + '&password=' + myArray[2].password + '&streamType=' + myArray[2].streamType)
////                        $("#iframe4").attr("src", '/video/video?ip=' + myArray[4].ip + '&ipAport=' + myArray[3].ipAport + '&userName=' + myArray[3].userName + '&password=' + myArray[3].password + '&streamType=' + myArray[3].streamType)
////                        $("#iframe5").attr("src", '/video/video?ip=' + myArray[0].ip + '&ipAport=' + myArray[4].ipAport + '&userName=' + myArray[4].userName + '&password=' + myArray[4].password + '&streamType=' + myArray[4].streamType)
////                    }else{
////                        for(var i=0;i<myArray.length;i++){
////                            $("#iframe"+(i+1)).attr("src", '/video/video?ip=' + myArray[i].ip + '&ipAport=' + myArray[i].ipAport + '&userName=' + myArray[i].userName + '&password=' + myArray[i].password + '&streamType=' + myArray[i].streamType)
////                        }
////                    }
////                    var first=myArray.shift(myArray[0])
////                    myArray.push(first);
////                    console.log(myArray);
////                }, 20000);
//
//            }
//        })

        $(document).on('click','.pic img',function () {
            var imgs=$(this).attr('src');
            var wt=(document.documentElement.clientWidth || document.body.clientWidth)*0.8;
            var ht=(document.documentElement.clientHeight || document.body.clientHeight)*0.8;
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                area:[wt+'px',ht+'px'],
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content:
//                '<img src="'+imgs+'" width="'+wt+'" height="'+ht+'">'
                '<div class="bigImg"  style="width: '+(wt-20)+'px;height:'+ht+'px;text-align: center">' +
                '<img src="'+imgs+'" style="max-width:'+(wt-20)+'px;max-height: '+(ht-20)+'px;">' +
                '</div>',
                success:function(){
                    $('img').bind("mousewheel",
                        function() {
                            zoomImg(this,(wt-20),(ht-20));
                            return false;
                        });

                }
            });

        })

        $(document).on('click','.biJiao',function () {
            var imgs=$(this).attr('img1')
            var imgs2=$(this).attr('img2')
            var wt=(document.documentElement.clientWidth || document.body.clientWidth)*0.8;
            var ht=(document.documentElement.clientHeight || document.body.clientHeight)*0.8;
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                area:[wt+'px',ht+'px'],
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content:
//                '<img src="'+imgs+'" width="'+wt+'" height="'+ht+'">'
                '<div class="bigImg"  style="width: '+(wt-20)+'px;height:'+ht+'px;text-align: center">' +
                '<img src="'+imgs+'" style="width: 50%;">' +
                '<img src="'+imgs2+'" style="width: 50%;">' +
                '</div>',
                success:function(){
//                    $('img').bind("mousewheel",
//                        function() {
//                            zoomImg(this,(wt-20),(ht-20));
//                            return false;
//                        });

                }
            });




        })
        $('#iframe2').attr('src','/video/videoNewFour?type=223.113.67.230:92')
//        $('#iframe2').attr('src','/video/chVideoFour?type=223.113.67.230:92')
        $('#iframe3').attr('src','/street/baidumap')

        function zoomImg(o,w,h) {
            var zoom = parseInt(o.style.zoom, 10) || 100;
            zoom += event.wheelDelta / 2; //可适合修改

            if (zoom > 0) o.style.zoom = zoom + '%';$('.bigImg').width(w);$('.bigImg').height(h)
        }

        $(document).on('click','.layui-layer-nobg',function () {
            layer.closeAll()
        })
    })








</script>
</body>
</html>
